<?php
defined('BY_JYA') or exit('error');

$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$return['extradata']=array();
if($_RQ['op']=='list'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'plugin_name'=>'jy_weishop');
	$onepluginname=$this->model('goods')->is_onegoods($_SESSION['current_plugin'],$_RQ['pluginname']);
	if($onepluginname){
			$params['plugin_name']=$onepluginname;
			$return['params']['plugin_name']=$onepluginname;
	}else{
			$params['plugin_name OR']='plugin_name=\'jy_weishop\' or plugin_name=\'\' or plugin_name=\''.$_SESSION['current_plugin'].'\'';
	}
	$fields=array('id','title','picurl','description');
	$pindex = max(1, intval($_RQ['page']));
	if($_RQ['num']){
		$psize = $_RQ['num'];
	}else{
		$psize = 15;
	}
	$total='';
	$parameter=array(
		'params'=>$params,
		'fields'=>$fields,
		'limit'=>array($pindex,$psize),
	);
	$list=pdo_getslice('core_account_article_fenlei',$params,array($pindex,$psize),$total,$fields,'','id desc');
	$return['list']=$list?$list:array();
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	exi($return);
}


?>